######################################################################################
#
# This file was provided as part of the SharePoint Mystery Deployment package
# Created by Christopher Kimbell (http://sharepointmystery.com)
#
######################################################################################

# -----------------------------------------------------------------
# Creates an object used to manipulate the site provisioning settings
# -----------------------------------------------------------------
function New-SiteProvisioningSettings()
{
    $obj=new-object PSObject -Property @{
        WebTemplates = @();
        AuthenticationProviders = @();
        ActiveAuthenticationProvider = "";
        WebApplication = $null;
    }
    # -----------------------------------------------------------------
    # Configures the site provisioning settings
    # -----------------------------------------------------------------
    Add-Method $obj "Configure" `
    {
		Write-Operation "Configuring Site provisioning Settings"
		
		Set-SPMSiteProvisioningSettings -WebApplication $this.WebApplication.DefaultZone.AbsoluteUrl `
			-ActiveAuthenticationProvider $this.ActiveAuthenticationProvider `
			-WebTemplates $this.WebTemplates 
     }
     return $obj
}
